// 引入vue模块
import Vue from 'vue'
// 引入路由模块
import VueRouter from 'vue-router'

// 引入路由规则所对应的组件
import Home from '../pages/home'
import Mudi from '../pages/mudi'
import Guanjia from '../pages/guanjia'
import Mine from '../pages/mine'
import Searchyemian from '../components/shouye_searchyemian'
import One from '../pages/one'
import Two from '../pages/two'
import Zhucepage from '../pages/zhucepage'
import Find from '../pages/find'
import Shezhi from '../pages/shezhi'
import Amine from '../pages/aftermine'
import Fenshen from '../pages/fenshen'
// 分类
import item from '../pages/item'
import alls from '../components/alls'

// 纵情狮城
import lion from '../pages/lion'
// 子路由
import feiyong from '../components/feiyong'


// 山哥写的模块
// 天气模块
import Weather from '../components/weather'
// 凯撒门店模块
import Mendian from '../components/mendian'
//城市选择模块
// import City from '../components/city'
// 导入评价模块
import Pingjia from '../components/pingjia'
// 导入反馈模块
import Fankui from '../components/fankui'
// 倒入优惠模块
import Youhui from '../components/youhui'
//导入map模块
import sgMap from '../components/map'


// 三土
// 引入参团游模块
import Tour1 from '../components/tour1'
// 引入邮轮模块
import Tour2 from '../components/tour2'
// 引入全部国家列表
import allCountry from '../components/tour2/allCountry'

// 导入活动模块
import Demo2 from '../components/demo2'

// 引入私人定制模块
import Tour4 from '../components/tour4'
// 引入私人订制
import Choice from '../components/choice'
// 引入热门国家模块
import Hot from '../components/hot'
// 引入计划安排模块
import Plan from '../components/plan'
// 引入订单模块
import Order from '../components/order'
// 引入订单提交成功页
import Success from '../components/success'
// 引入收藏页
import shoucang from '../components/shoucang'


// 安装路由模块到vue模块中
Vue.use(VueRouter)

// 创建路由规则
const routes = [
  {path:"/",component:Home},
  {path:"/home",component:Home},
  {path:"/mudi",component:Mudi,children:[
    {path:'/mudi',component:item},
    {path:'/mudi/item',component:item},
    {path:'/mudi/:all',component:alls}
  ]},
  {path:"/guanjia",component:Guanjia},

  {name:'mine',path:"/mine",component:Mine,children:[
    {path:'/mine',component:One},
 		{name:'one',path:'/mine/one',component:One},
 		{name:'two',path:'/mine/two',component:Two}
  ]},
  {path:'/zhucepage',component:Zhucepage},
  {name:'find',path:'/find',component:Find},
  {name:'aftermine',path:"/aftermine",component:Amine},
  {name:'shezhi',path:"/shezhi",component:Shezhi},
  {path:"/mine",component:Mine},
  {path:'/weather',component:Weather},
  {path:'/lion',component:lion},
  {path:'/lion/fei/feiyong',component:feiyong},
  {name: 'plan',path:"/plan",component:Plan},
  {name: 'order',path:"/order",component:Order},
  {path:'/tour1',component:Tour1},
  {path:'/tour4',component:Tour4},
  {path:'/choice',component: Choice,children:[
     {name: 'choice',path:'/choice/',component:Hot},
     {path:'/choice/hot',component:Hot}
 ]},
  {path:'/weather',component:Weather},
  {path:'/mendian',component:Mendian},
  {path:'/pingjia',component:Pingjia},
  {path:'/fankui',component:Fankui},
  {path:'/youhui',component:Youhui},
  {path:'/map',component:sgMap},
  {path:'/searchyemian',component:Searchyemian},
  {path:'/tour2',component:Tour2},
  {name: 'map',path:'/map',component:sgMap},
  {path:'/demo2',component:Demo2},
  {name: 'success',path:'/success',component: Success},
  {path:'/shoucang',component:shoucang}
]

// 根据规则创建对象
const router = new VueRouter({
  routes
})

// 把router对象当作模块导出
export default router
